Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution #868

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

solution #868

wants to merge 4 commits into from

Conversation

G0odvin
Copy link

@G0odvin G0odvin commented Jul 28, 2023

Copy link
Contributor

@mykhalenych mykhalenych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix it
Screenshot 2023-07-28 at 17 14 40

and add validation to email
Screenshot 2023-07-28 at 17 16 39

Copy link

@maxim2310 maxim2310 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, lets make some improve for it 1.https://www.loom.com/share/529f834e36fc442584eaabe4a92d5692
2. and check out all comments and review your code again on duplicate these mistakes

};

type UserIdType = {
userId: User | null,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why its called userId if its whole user

const users = useContext(UserContext);
const [isOpen, setIsOpen] = useState(false);

const userIdContext = useContext(UserIdContext);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in all components you need to destructure context obj

src/App.tsx Outdated
Comment on lines 18 to 19
const { isLoadingPosts } = useContext(ErrorContext);
const { isError } = useContext(ErrorContext);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why its separate destructure? its can made in one

>
<div className="tile is-child box is-success ">
<PostDetails />
{postDetails.postData !== null && (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also need to destracture postDetails

Comment on lines 15 to 19
const handleUserId
= (userId: User) => {
userIdContext.handleUserSelect(userId);
handleMenu();
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const handleUserId
= (userId: User) => {
userIdContext.handleUserSelect(userId);
handleMenu();
};
const handleUserId = (userId: User) => {
userIdContext.handleUserSelect(userId);
handleMenu();
};

Copy link

@maxim2310 maxim2310 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job overall! Just couple tiny things needs to be fixed before approval)

in black lines must be email and message belove, and form must be cleared after submit
image

Comment on lines +33 to +37
{user ? (
<span>{user.name}</span>
) : (
<span>Choose a user</span>
)}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{user ? (
<span>{user.name}</span>
) : (
<span>Choose a user</span>
)}
{user
? (<span>{user.name}</span> )
: (<span>Choose a user</span>)
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, about cleaning the form - in the task it is written "keep the name and email after the successful submit but clear a comment text;". About email in black line box - in the task, the layout of the component PostDetails
was ready and it showed the user's name, not his email.
gh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants